# $Id: PKGBUILD 64750 2012-02-18 03:56:17Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
# Contributor: Drew Desai <alerante@yahoo.com>
# Contributor: Hugo Ideler <hugoideler@dse.nl>

pkgname=hawknl
pkgver=1.68
pkgrel=3
pkgdesc="An open source game oriented network API"
arch=('i686' 'x86_64')
url="http://www.hawksoft.com/hawknl/"
license=('LGPL')
depends=('glibc')
source=(http://www.hawksoft.com/download/files/HawkNL${pkgver/\./}src.tar.gz
        $pkgname.patch)
md5sums=('2e4971d422b8c5cadfe2a85527ff2fcf'
         'a7e695ceeabb816ba147de563c61616f')

build() {
  cd "$srcdir"/$pkgname$pkgver

  patch -Np0 -i ../$pkgname.patch
  make -f makefile.linux
  install -m755 -d "$pkgdir"/usr/{lib,include}
}

package() {
  cd "$srcdir"/$pkgname$pkgver

  make -f makefile.linux \
    LIBDIR="$pkgdir"/usr/lib \
    INCDIR="$pkgdir"/usr/include \
    OPTFLAGS="-D_GNU_SOURCE -D_REENTRANT" \
    install
}
